#!/bin/bash
#功能函数
funcs=`which functions.sh`
if [ "$funcs" != "" ] ;then
    echo "funcs=$funcs"
    . $funcs
else
    funcs=./functions.sh
    if [ "$funcs" != "" ] ;then
	echo "funcs=$funcs"
	. $funcs
    else
	echo "./functions.sh not exist!"
	return
    fi
fi
STF=/tmp/st
echoTextRed "$0  \"fliter strings\" eg: \"\\.a \\.o \\.so\""
svn st mediatek/ |grep -E "M|MM" -w |awk '{print $2}' | tee $STF 1>/dev/null

cp $STF /tmp/aaa -rf
fliters="
cgen
dct
\.pyc
\.map
\.tag
\.err
KEY_
nand_device_list.h
Android_scatter.txt 
partition_define.h 
custom_emi.c
custom_emi.h
memory_info.h
preloader.h
IMEFeatureOption.java
FeatureOption.java
Bluetooth\/build\/AndroidManifest.xml
bluetooth\/driver\/custom
mhal\/src\/custom\/common
mhal\/src\/custom\/inc
boot_logo_updater\/custom
"
if [ -n "$1" ]; then
fliters="$fliters $1"
fi

for f in $fliters
do
sed -i "/$f/d"  $STF
done
echoTextGreen "***************************"
cat $STF
echoTextGreen "***************************"

########################

svn st mediatek/ |grep ? -w |awk '{print $2}' | tee /tmp/add 1>/dev/null
cp /tmp/add /tmp/alladd -rvf
fliters2="
\.mod
o.cmd
\.module
\.order
\.builtin
\.depend
"
echo "aaaaaaaa"
fliters2="$fliters2 $fliters"
for f in $fliters2
do
echo "$f"
sed -i "/$f/d"  /tmp/add
done


